package edu.ynu.se.xiecheng.achitectureclass.dao;

import edu.ynu.se.xiecheng.achitectureclass.common.dao.LogicDAO;
import edu.ynu.se.xiecheng.achitectureclass.entity.Item;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.query.Param;

import java.util.Optional;

public interface ItemDao extends LogicDAO<Item,Long> {
    @Query("select s FROM Item s WHERE s.itemId = :itemId")
    Optional<Item> findById(@Param("itemId") Long itemId);
}
